Skip to main content

Get All Windows

AutomatR.Windows.Activities.GetAllWindows

The "Get All Windows" activity in AutomatR for Windows UI Automation allows you to retrieve the names of all active windows. This activity is useful when you need to obtain information about the currently open applications or perform actions based on available windows.

Properties

NameDescription
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before starting the activity. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.
Output
ResultReturns the list of SelectorWindow objects for the available open apps. SelectorWindow objects contain information such as window title, process name, and handle.

How to use:

  1. Drag and drop the "Get All Windows" activity onto the workflow.
  2. Optionally, configure the delay setting.
  3. Execute the workflow to retrieve the list of all active windows.

Example: Consider an example where the "Get All Windows" activity is used to obtain information about all currently open windows:

Get All Windows:
Display Name: "Get All Open Windows"
Delay: 2
Result: windowsList

In this example, the activity waits for 2 seconds and then retrieves a list of SelectorWindow objects representing all active windows. The obtained list, stored in the "windowsList" variable, can be further utilized in the workflow.